﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;


//using THSBaseProvider;

namespace THSLib
{
    public class MessageQuestion
    {

        public const String EditQuestion = "Bạn có chắc chắn sửa";
        public const String NewQuestion = "Có phải bạn muốn tạo mới";
        public const String DeleteQuestion = "Do you want to delete ";
        public const String LogOffQuestion = "Bạn muốn log off";
        public const String ExitTHSQuestion = "Bạn muốn thoát khỏi chương trình THS?";
        public const String HibernateModuleQuestion = "Bạn có muốn lưu";
        public const String ModuleActionQuestion = "Bạn có muốn lưu hoặc huỷ";
        public const String SaveBeforeExitModuleQuestion = "Bạn phải lưu lại trước khi thoát!";
        public static DialogResult ShowEditMessageQuestion()
        {            
            String strMessage = String.Format("{0}?", EditQuestion);
            String strMessageCaption="THS";
            return MessageBox.Show(strMessage,strMessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            //return strMessage;
        }

        public static DialogResult ShowNewMessageQuestion(String strModuleName,String strLanguage)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strModuleName, strLanguage);
            String strMessage = String.Format("{0} {1} ?", NewQuestion, strModuleDesc);
            String strMessageCaption=String.Format("Mới {0}",strModuleDesc);
            //return strMessage;
            return MessageBox.Show(strMessage, strMessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static DialogResult ShowDeleteMessageQuestion()
        {
            //String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strModuleName, strLanguage);
            String strMessage = String.Format("{0}?", DeleteQuestion);
            String strMessageCaption = "THS";

            return MessageBox.Show(strMessage, strMessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
            //return strMessage;
        }

        public static DialogResult ShowMessageLogOffQuestion(String strUserName)
        {
            String strMessage = String.Format("{0} {1}?", LogOffQuestion, strUserName);
            String strMessageCaption = "THS-Log Off";
            return MessageBox.Show(strMessage, strMessageCaption, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static DialogResult ShowMessageExitQuestion()
        {
            return MessageBox.Show(ExitTHSQuestion, "THS", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static DialogResult ShowMessageHibernateModuleQuestion(String strModuleName,String strLanguage)
        {
            String strModuleDesc = new STModuleDescriptionsController().GetDescriptionByModuleNameAndLanguageName(strModuleName, strLanguage);
            String strMessage=String.Format("{0} {1}?",HibernateModuleQuestion,strModuleDesc);
            return MessageBox.Show(strMessage, "THS", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static DialogResult ShowMessageSaveBeforeExitModuleQuestion()
        {
            return MessageBox.Show(SaveBeforeExitModuleQuestion,"THS",MessageBoxButtons.YesNo,MessageBoxIcon.Question);            
        }
       
    }
}
